import { BrowserRouter, Switch, Route, Link } from 'react-router-dom';
import Login from './pages/login';
import Home from './pages/home';
import UseStateDemo from './pages/test/UseStateDemo';
import UseEffectDemo from './pages/test/UseEffectDemo';
import cart from './pages/cart';

function App() {
    return (
        <BrowserRouter>
            {/* <Link to="/login">登录</Link>
            <Link to="/state">演示 state hook</Link>
            <Link to="/effect">演示 effect hook</Link> */}

            <Switch>
                <Route path="/" exact component={Home} />
                <Route path="/login" component={Login} />
                <Route path="/cart" component={cart} />
                <Route path="/state" component={UseStateDemo} />
                <Route path="/effect" component={UseEffectDemo} />
            </Switch>
        </BrowserRouter>
    );
}

export default App;
